import store from './storage'

const TOKEN_KEY = 'token'
const SID_KEY = 'uid'

export function setToken (info) {
  store.set(TOKEN_KEY, info)
  return info
}

export function getToken () {
  return store.get(TOKEN_KEY)
}
export function removeToken () {
  store.remove(TOKEN_KEY)
}

// 菜单
export function getSid () {
  return store.get(SID_KEY)
}
export function setSid (id) {
  store.set(SID_KEY, id)
  return id
}
